{% from 'flagit/includes/macros.html' import date_by_user with context %}
<h3>{{ _('Title:') }}</h3>
<p class="title">{{ object.content_object.thread.title }}</p>
<h3>{{ _('Content:') }}</h3>
<div class="content">{{ object.content_object.content_parsed }}</div>
<h3>{{ _('Created:') }}</h3>
<p class="created">
  {% set author = object.content_object.author if object.content_object.author else object.content_object.creator %}
  {{ date_by_user(object.content_object.created, author) }}
</p>
{% if object.content_object.updated_by %}
  <h3>{{ _('Updated:') }}</h3>
  <p class="updated">
    {{ date_by_user(object.content_object.updated, object.content_object.updated_by) }}
  </p>
{% endif %}
<h3>{{ _('Flagged:') }}</h3>
<p class="flagged">
  {{ date_by_user(object.created, object.creator) }}
</p>
<h3>{{ _('Take Action:') }}</h3>
<div class="actions">
  <a href="{{ object.content_object.get_absolute_url() }}">View</a>
  {% if object.content_type.name == 'KB Forum Post' %}
    {% if user.has_perm('kbforums.change_post') %}
      <a class="edit" href="{{ url('wiki.discuss.edit_post', object.content_object.thread.document.slug, object.content_object.thread.id, object.content_object.id) }}">{{ _('Edit') }}</a>
    {% endif %}
    {% if user.has_perm('kbforums.delete_post') %}
      <a class="delete" href="{{ url('wiki.discuss.delete_post', object.content_object.thread.document.slug, object.content_object.thread.id, object.content_object.id) }}">{{ _('Delete') }}</a>
    {% endif %}
  {% endif %}
</div>
